home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / iAI.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  7KB  |  267 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // IAI.h
  5. //
  6. // API for the package AI.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header:
  11. //
  12.  
  13. #ifdef FLUX_COMPILE
  14.  
  15. FLUX_DECLARE_EXTENSION(iAI);
  16.  
  17. #ifdef FLUX_LIB
  18. #if _MSC_VER >= 1000
  19. #pragma comment( lib, "iai" )
  20. #endif // _MSC_VER >= 1000
  21. #endif // FLUX_LIB
  22. #else
  23.  
  24. // Dependencies
  25. uses iShip, iDockport, iLagrangePoint;
  26.  
  27. //
  28. // iAI.GiveApproachOrder( hobject us, hobject target )
  29. //
  30. // Gives the ship or group an order to approach the target ship or group. 
  31. // We attempt to get within a factor of our radii with group-group 
  32. // orders pairing off.
  33. //
  34. prototype iAI.GiveApproachOrder( hobject us, hobject target ); 
  35.  
  36. //
  37. // iAI.GiveApproachOrderNoDropOff( hobject us, hobject target )
  38. //
  39. // Gives the ship or group an order to approach the target ship or group. 
  40. // We attempt to get within a factor of our radii with group-group 
  41. // orders pairing off.  This order (in a similar fashion to formate) will
  42. // never be removed.
  43. //
  44. prototype iAI.GiveApproachOrderNoDropOff( hobject us, hobject target ); 
  45.  
  46. //
  47. // iAI.GiveApproachOrderAdvanced( hobject us, hobject target,
  48. //                                  float radius, bool allow_avoidance )
  49. //
  50. // An advanced version of the approach order.  Allows specification of an
  51. // approach radius, completion radius and whether or not to use avoidance
  52. //
  53. prototype iAI.GiveApproachOrderAdvanced( hobject us, hobject target,
  54.                     float radius, float completion_radius,
  55.                     bool allow_avoidance );
  56.  
  57. //
  58. // iAI.RemoveOrder( hobject ship_or_group )
  59. //
  60. // Removes the current order from the AI pilot of a ship or group of ships
  61. //
  62. prototype iAI.RemoveOrder( hobject ship_or_group );
  63.  
  64. //
  65. // iAI.PurgeOrders( hobject ship_or_group )
  66. //
  67. // Removes all orders from the AI pilot of a ship or group of ships
  68. //
  69. prototype iAI.PurgeOrders( hobject ship_or_group );
  70.  
  71. //
  72. // iAI.GiveFormateOrder( hobject ship, hobject target, float x, float y, float z )
  73. //
  74. // Gives a ship or group a formate order with another ship or group.
  75. // The x, y, z positions represent local offsets with group-group orders pairing
  76. // off piecewise.
  77. //
  78. prototype iAI.GiveFormateOrder( hobject us, hobject target, float x, float y, float z );
  79.  
  80. //
  81. // iAI.GiveAttackOrder( hobject us, hobject target )
  82. //
  83. // Gives the ship or group an attack order against the given target sim or group.
  84. //
  85. prototype iAI.GiveAttackOrder( hobject us, hobject target );
  86.  
  87. //
  88. // The various attack styles - NOTE Keep this up to date with Functions.cpp
  89. //
  90. enum eAttackStyle
  91. {
  92.     AS_TailBite,
  93.     AS_Strafe,
  94.     AS_GunStation,
  95.     AS_FacingAttack,
  96.     AS_MissileBoat
  97. };
  98.  
  99. //
  100. // iAI.GiveSpecificAttackOrder( hobject us, hobject target, enum attack_style )
  101. //
  102. // Gives an attack order to a ship or group of ships using the given attack style
  103. //
  104. prototype iAI.GiveSpecificAttackOrder( hobject us, hobject target, int attack_style );
  105.  
  106. //
  107. // iAI.GiveFleeOrder( hobject us, hisim aggressor )
  108. //
  109. // Gives the ship or group a flee order from the given aggressor.
  110. //
  111. prototype iAI.GiveFleeOrder( hobject us, hisim target );
  112.  
  113. //
  114. // iAI.GiveGenericAttackOrder( hobject us )
  115. //
  116. // Gives the ship a generic attack order (will attack closest vessels)
  117. //
  118. prototype iAI.GiveGenericAttackOrder( hobject us );
  119.  
  120. //
  121. // iAI.GiveDockOrder( hobject ship, hobject target )
  122. //
  123. // Gives the ship or group a dock order with another ship or group.
  124. //
  125. prototype iAI.GiveDockOrder( hobject us, hobject target );
  126.  
  127. //
  128. // iAI.GiveReservedDockOrder( hobject us, hobject targ )
  129. //
  130. // Gives a standard dock order with immediate reserving of ports
  131. //
  132. prototype iAI.GiveReservedDockOrder( hobject us, hobject target );
  133.  
  134. //
  135. // iAI.GiveEscortOrder( hobject ship, hobject target, float x, float y,
  136. // float z, float radius )
  137. //
  138. // Gives the ship an escort order with the target ship or group, guarding the
  139. // given radius.
  140. //
  141. prototype iAI.GiveEscortOrder( hobject ship, hobject target, 
  142.                                float x, float y, float z, float radius );
  143.  
  144. //
  145. // iAI.GiveDockOrderWithDockport( hdockport dockport1, hdockport dockport2 )
  146. //
  147. // Gives the ship a dock order with a specific dockport.
  148. //
  149. prototype iAI.GiveDockOrderWithDockport( hdockport dockport1, 
  150.                                          hdockport dockport2 );
  151.  
  152. //
  153. // bool iAI.HasOrder( hship ship )
  154. //
  155. // Returns TRUE if we have an order.
  156. //
  157. prototype bool iAI.HasOrder( hship ship );
  158.  
  159. //
  160. // bool iAI.IsOrderComplete( hobject ship_or_group )
  161. //
  162. // Returns TRUE if the order is complete (no orders are on the stack) or
  163. // the top-most agent is complete.  Can now be used with groups
  164. //
  165. prototype bool iAI.IsOrderComplete( hobject ship_or_group );
  166.  
  167. //
  168. // Enumeration for the type of order
  169. //
  170. enum eOrderType
  171. {
  172.     OT_None,
  173.     OT_Attack,
  174.     OT_Formate,
  175.     OT_Approach,
  176.     OT_Dock,
  177.     OT_Flee,
  178.     OT_Escort
  179. };
  180.  
  181. //
  182. // eOrderType iAI.CurrentOrderType( hship ship )
  183. //
  184. // Returns the current order type
  185. //
  186. prototype eOrderType iAI.CurrentOrderType( hship ship );
  187.  
  188. //
  189. // hisim iAI.CurrentOrderTarget( hship ship )
  190. //
  191. // Returns the current order target
  192. //
  193. prototype hisim iAI.CurrentOrderTarget( hship ship );
  194.  
  195. //
  196. // string iAI.CurrentOrderName( hship ship )
  197. //
  198. // Returns the current order name
  199. //
  200. prototype string iAI.CurrentOrderName( hship ship );
  201.  
  202. //
  203. // bool iAI.ForceLPRoute( hship ship, hlagrangepoint start, hlagrangepoint end )
  204. //
  205. // Forces the given ship (if its AI is currently active) to head through the given LP
  206. // to arrive at the end LP.
  207. //
  208. prototype bool iAI.ForceLPRoute( hship ship, hlagrangepoint start_lp, hlagrangepoint end_lp );
  209.  
  210. //
  211. // iAI.ClearAutopilot
  212. //
  213. // Clears any player autopilot
  214. //
  215. prototype iAI.ClearAutopilot();
  216.  
  217. //
  218. // iAI.AvoidanceRadius( hisim target, hisim us )
  219. //
  220. // Returns the avoidance radius for us avoiding the given target
  221. //
  222. prototype float iAI.AvoidanceRadius( hisim target, hisim us );
  223.  
  224. //
  225. // iAI.InnerMarkerRadius( hisim target, hisim us )
  226. //
  227. // Returns the inner marker radius for approach/formate
  228. //
  229. prototype float iAI.InnerMarkerRadius( hisim target, hisim us );
  230.  
  231. //
  232. // iAI.SetIgnoreFunction( hship ship, string func )
  233. //
  234. // Sets the ignore function
  235. //
  236. prototype iAI.SetIgnoreFunction( hship ship, string func );
  237.  
  238. //
  239. // iAI.SetFightFunction( hship ship, string func )
  240. //
  241. // Sets the fight function
  242. //
  243. prototype iAI.SetFightFunction( hship ship, string func );
  244.  
  245. //
  246. // iAI.SetFleeFunction( hship ship, string func )
  247. //
  248. // Sets the flee function
  249. //
  250. prototype iAI.SetFleeFunction( hship ship, string func );
  251.  
  252. //
  253. // iAI.SetWimpyFunction( hship ship, string func )
  254. //
  255. // Sets the wimpy function
  256. //
  257. prototype iAI.SetWimpyFunction( hship ship, string func );
  258.  
  259. //
  260. // iAI.IsCapsuleJumpAccelerating( hship ship )
  261. //
  262. // Returns true if we are accelerationg for a capsule jump
  263. //
  264. prototype bool iAI.IsCapsuleJumpAccelerating( hship ship );
  265.  
  266. #endif // FLUX_LIB
  267.